/**
 * @copyright 2009-2023 Vanilla Forums Inc.
 * @license GPL-2.0-only
 */

import { STORY_ICON, STORY_IMAGE, STORY_LEADERS } from "@library/storybook/storyData";
import { ICategoryItem } from "@library/categoriesWidget/CategoryItem";
import random from "lodash-es/random";

export const mockCategoriesDataWithHeadings: ICategoryItem[] = [
    {
        categoryID: 1,
        to: "#",
        name: "Heading Category 1",
        description: "Heading Category 1 description",
        displayAs: "heading",
        depth: 1,
        iconUrl: STORY_ICON,
        imageUrl: STORY_IMAGE,
        counts: [],
        children: [
            {
                categoryID: 2,
                to: "#",
                name: "Category 1.1",
                description: "Category 1.1 description",
                displayAs: "discussions",
                iconUrl: STORY_ICON,
                imageUrl: STORY_IMAGE,
                depth: 2,
                parentCategoryID: 1,
                counts: [
                    { count: 99, countAll: 99, labelCode: "discussions" },
                    { count: 99000, countAll: 99000, labelCode: "comments" },
                    { count: 99099, countAll: 99099, labelCode: "posts" },
                    { count: 9, countAll: 9, labelCode: "followers" },
                ],
                lastPost: {
                    url: "#",
                    name: "Some discussion",
                    dateInserted: "2020-10-06T15:30:44+00:00",
                    insertUser: STORY_LEADERS[random(0, 5)].user,
                },
                children: [
                    {
                        categoryID: 3,
                        iconUrl: STORY_ICON,
                        imageUrl: STORY_IMAGE,
                        to: "#",
                        name: "Heading Category 1.1.1",
                        description: "Heading Category 1.1.1 description",
                        parentCategoryID: 2,
                        depth: 3,
                        displayAs: "heading",
                        counts: [],
                        children: [
                            {
                                categoryID: 20,
                                iconUrl: STORY_ICON,
                                imageUrl: STORY_IMAGE,
                                to: "#",
                                depth: 4,
                                parentCategoryID: 3,
                                displayAs: "discussions",
                                name: "Category 1.1.1.2",
                                description: "Category 1.1.1.1 description",
                                children: [],
                                counts: [
                                    { count: 99, countAll: 99, labelCode: "discussions" },
                                    { count: 99000, countAll: 99000, labelCode: "comments" },
                                    { count: 99099, countAll: 99099, labelCode: "posts" },
                                ],
                                lastPost: {
                                    url: "#",
                                    name: "Some discussion",
                                    dateInserted: "2020-10-06T15:30:44+00:00",
                                    insertUser: STORY_LEADERS[random(0, 5)].user,
                                },
                            },
                        ],
                    },
                ],
            },
            {
                categoryID: 4,
                iconUrl: STORY_ICON,
                imageUrl: STORY_IMAGE,
                to: "#",
                depth: 2,
                parentCategoryID: 1,
                displayAs: "discussions",
                name: "Category 1.2",
                description: "Category 1.2 description",
                children: [
                    {
                        categoryID: 23,
                        to: "#",
                        name: "Category 1.1",
                        description: "Category 1.1 description",
                        displayAs: "discussions",
                        iconUrl: STORY_ICON,
                        imageUrl: STORY_IMAGE,
                        depth: 3,
                        parentCategoryID: 4,
                        counts: [
                            { count: 99, countAll: 99, labelCode: "discussions" },
                            { count: 99000, countAll: 99000, labelCode: "comments" },
                            { count: 99099, countAll: 99099, labelCode: "posts" },
                            { count: 9, countAll: 9, labelCode: "followers" },
                        ],
                        lastPost: {
                            url: "#",
                            name: "Some discussion",
                            dateInserted: "2020-10-06T15:30:44+00:00",
                            insertUser: STORY_LEADERS[random(0, 5)].user,
                        },
                    },
                ],
                counts: [
                    { count: 99, countAll: 99, labelCode: "discussions" },
                    { count: 99000, countAll: 99000, labelCode: "comments" },
                    { count: 99099, countAll: 99099, labelCode: "posts" },
                    { count: 9, countAll: 9, labelCode: "followers" },
                ],
                lastPost: {
                    url: "#",
                    name: "Some discussion",
                    dateInserted: "2020-10-06T15:30:44+00:00",
                    insertUser: STORY_LEADERS[random(0, 5)].user,
                },
            },
            {
                categoryID: 5,
                iconUrl: STORY_ICON,
                imageUrl: STORY_IMAGE,
                to: "#",
                depth: 2,
                displayAs: "heading",
                parentCategoryID: 1,
                name: "Heading Category 1.1",
                description: "Heading Category 1.1 description",
                counts: [],
                children: [
                    {
                        categoryID: 6,
                        iconUrl: STORY_ICON,
                        imageUrl: STORY_IMAGE,
                        to: "#",
                        parentCategoryID: 5,
                        depth: 3,
                        displayAs: "discussions",
                        name: "Category 1.1.1",
                        description: "Category 1.1.1 description",
                        children: [
                            {
                                categoryID: 25,
                                to: "#",
                                name: "Category 1.1.1.1",
                                description: "Category 1.1.1.1 description",
                                displayAs: "discussions",
                                iconUrl: STORY_ICON,
                                imageUrl: STORY_IMAGE,
                                depth: 4,
                                parentCategoryID: 5,
                                counts: [
                                    { count: 99, countAll: 99, labelCode: "discussions" },
                                    { count: 99000, countAll: 99000, labelCode: "comments" },
                                    { count: 99099, countAll: 99099, labelCode: "posts" },
                                    { count: 9, countAll: 9, labelCode: "followers" },
                                ],
                                lastPost: {
                                    url: "#",
                                    name: "Some discussion",
                                    dateInserted: "2020-10-06T15:30:44+00:00",
                                    insertUser: STORY_LEADERS[random(0, 5)].user,
                                },
                            },
                        ],
                        counts: [
                            { count: 99, countAll: 99, labelCode: "discussions" },
                            { count: 99000, countAll: 99000, labelCode: "comments" },
                            { count: 99099, countAll: 99099, labelCode: "posts" },
                            { count: 9, countAll: 9, labelCode: "followers" },
                        ],
                        lastPost: {
                            url: "#",
                            name: "Some discussion",
                            dateInserted: "2020-10-06T15:30:44+00:00",
                            insertUser: STORY_LEADERS[random(0, 5)].user,
                        },
                    },
                    {
                        categoryID: 7,
                        iconUrl: STORY_ICON,
                        imageUrl: STORY_IMAGE,
                        to: "#",
                        depth: 3,
                        displayAs: "discussions",
                        parentCategoryID: 5,
                        name: "Category 1.1.2",
                        description: "Category 1.1.2 description",
                        children: [],
                        counts: [
                            { count: 99, countAll: 99, labelCode: "discussions" },
                            { count: 99000, countAll: 99000, labelCode: "comments" },
                            { count: 99099, countAll: 99099, labelCode: "posts" },
                            { count: 9, countAll: 9, labelCode: "followers" },
                        ],
                        lastPost: {
                            url: "#",
                            name: "Some discussion",
                            dateInserted: "2020-10-06T15:30:44+00:00",
                            insertUser: STORY_LEADERS[random(0, 5)].user,
                        },
                    },
                    {
                        categoryID: 8,
                        iconUrl: STORY_ICON,
                        imageUrl: STORY_IMAGE,
                        to: "#",
                        depth: 3,
                        displayAs: "heading",
                        parentCategoryID: 5,
                        name: "Heading Category 1.1.1",
                        description: "Heading Category 1.1.1 description",
                        counts: [],
                        children: [
                            {
                                categoryID: 21,
                                iconUrl: STORY_ICON,
                                imageUrl: STORY_IMAGE,
                                to: "#",
                                depth: 4,
                                parentCategoryID: 8,
                                displayAs: "discussions",
                                name: "Category 1.1.1.1",
                                description: "Category 1.1.1.1 description",
                                children: [],
                                counts: [
                                    { count: 99, countAll: 99, labelCode: "discussions" },
                                    { count: 99000, countAll: 99000, labelCode: "comments" },
                                    { count: 99099, countAll: 99099, labelCode: "posts" },
                                    { count: 9, countAll: 9, labelCode: "followers" },
                                ],
                                lastPost: {
                                    url: "#",
                                    name: "Some discussion",
                                    dateInserted: "2020-10-06T15:30:44+00:00",
                                    insertUser: STORY_LEADERS[random(0, 5)].user,
                                },
                            },
                        ],
                    },
                ],
            },
        ],
    },
    {
        categoryID: 9,
        iconUrl: STORY_ICON,
        imageUrl: STORY_IMAGE,
        to: "#",
        name: "Category 1",
        description: "Category 1 description",
        depth: 1,
        displayAs: "discussions",
        counts: [
            { count: 99, countAll: 99, labelCode: "discussions" },
            { count: 99000, countAll: 99000, labelCode: "comments" },
            { count: 99099, countAll: 99099, labelCode: "posts" },
            { count: 9, countAll: 9, labelCode: "followers" },
        ],
        lastPost: {
            url: "#",
            name: "Some discussion",
            dateInserted: "2020-10-06T15:30:44+00:00",
            insertUser: STORY_LEADERS[random(0, 5)].user,
        },
        children: [
            {
                categoryID: 10,
                iconUrl: STORY_ICON,
                imageUrl: STORY_IMAGE,
                to: "#",
                parentCategoryID: 9,
                depth: 2,
                name: "Category 1.1",
                description: "Category 1.1 description",
                displayAs: "discussions",
                counts: [
                    { count: 99, countAll: 99, labelCode: "discussions" },
                    { count: 99000, countAll: 99000, labelCode: "comments" },
                    { count: 99099, countAll: 99099, labelCode: "posts" },
                    { count: 9, countAll: 9, labelCode: "followers" },
                ],
                lastPost: {
                    url: "#",
                    name: "Some discussion",
                    dateInserted: "2020-10-06T15:30:44+00:00",
                    insertUser: STORY_LEADERS[random(0, 5)].user,
                },
                children: [],
            },
        ],
    },
    {
        categoryID: 11,
        iconUrl: STORY_ICON,
        imageUrl: STORY_IMAGE,
        to: "#",
        name: "Category 1",
        description: "Category 1 description",
        depth: 1,
        displayAs: "discussions",
        children: [],
        counts: [
            { count: 99, countAll: 99, labelCode: "discussions" },
            { count: 99000, countAll: 99000, labelCode: "comments" },
            { count: 99099, countAll: 99099, labelCode: "posts" },
            { count: 9, countAll: 9, labelCode: "followers" },
        ],
        lastPost: {
            url: "#",
            name: "Some discussion",
            dateInserted: "2020-10-06T15:30:44+00:00",
            insertUser: STORY_LEADERS[random(0, 5)].user,
        },
    },
    {
        categoryID: 12,
        iconUrl: STORY_ICON,
        imageUrl: STORY_IMAGE,
        to: "#",
        depth: 1,
        name: "Heading Category 1",
        description: "Heading Category 1 description",
        displayAs: "heading",
        counts: [],
        children: [
            {
                categoryID: 13,
                iconUrl: STORY_ICON,
                imageUrl: STORY_IMAGE,
                to: "#",
                parentCategoryID: 12,
                name: "Category 1.1",
                description: "Category 1.1 description",
                depth: 2,
                displayAs: "discussions",
                counts: [
                    { count: 99, countAll: 99, labelCode: "discussions" },
                    { count: 99000, countAll: 99000, labelCode: "comments" },
                    { count: 99099, countAll: 99099, labelCode: "posts" },
                    { count: 9, countAll: 9, labelCode: "followers" },
                ],
                lastPost: {
                    url: "#",
                    name: "Some discussion",
                    dateInserted: "2020-10-06T15:30:44+00:00",
                    insertUser: STORY_LEADERS[random(0, 5)].user,
                },
                children: [
                    {
                        categoryID: 14,
                        iconUrl: STORY_ICON,
                        imageUrl: STORY_IMAGE,
                        to: "#",
                        parentCategoryID: 13,
                        name: "Heading Category 1.1.1",
                        description: "Heading Category 1.1 description",
                        displayAs: "heading",
                        depth: 3,
                        children: [],
                        counts: [],
                    },
                ],
            },
            {
                categoryID: 15,
                iconUrl: STORY_ICON,
                imageUrl: STORY_IMAGE,
                to: "#",
                parentCategoryID: 12,
                depth: 2,
                displayAs: "heading",
                name: "Heading Category 1.1",
                description: "Heading Category 1.1 description",
                children: [],
                counts: [],
                noChildCategoriesMessage: "No categories found.",
            },
            {
                categoryID: 16,
                iconUrl: STORY_ICON,
                imageUrl: STORY_IMAGE,
                to: "#",
                parentCategoryID: 12,
                depth: 2,
                displayAs: "discussions",
                name: "Category 1.2",
                description: "Category 1.2 description",
                counts: [
                    { count: 99, countAll: 99, labelCode: "discussions" },
                    { count: 99000, countAll: 99000, labelCode: "comments" },
                    { count: 99099, countAll: 99099, labelCode: "posts" },
                    { count: 9, countAll: 9, labelCode: "followers" },
                ],
                children: [],
            },
        ],
    },
    {
        categoryID: 17,
        iconUrl: STORY_ICON,
        imageUrl: STORY_IMAGE,
        to: "#",
        name: "Category 1",
        description: "Category 1 description",
        depth: 1,
        displayAs: "discussions",
        children: [
            {
                categoryID: 24,
                to: "#",
                name: "Category 1.1",
                description: "Category 1.1 description",
                displayAs: "discussions",
                iconUrl: STORY_ICON,
                imageUrl: STORY_IMAGE,
                depth: 2,
                parentCategoryID: 17,
                counts: [
                    { count: 99, countAll: 99, labelCode: "discussions" },
                    { count: 99000, countAll: 99000, labelCode: "comments" },
                    { count: 99099, countAll: 99099, labelCode: "posts" },
                    { count: 9, countAll: 9, labelCode: "followers" },
                ],
                lastPost: {
                    url: "#",
                    name: "Some discussion",
                    dateInserted: "2020-10-06T15:30:44+00:00",
                    insertUser: STORY_LEADERS[random(0, 5)].user,
                },
            },
        ],
        counts: [
            { count: 99, countAll: 99, labelCode: "discussions" },
            { count: 99000, countAll: 99000, labelCode: "comments" },
            { count: 99099, countAll: 99099, labelCode: "posts" },
            { count: 9, countAll: 9, labelCode: "followers" },
        ],
        lastPost: {
            url: "#",
            name: "Some discussion",
            dateInserted: "2020-10-06T15:30:44+00:00",
            insertUser: STORY_LEADERS[random(0, 5)].user,
        },
    },
    {
        categoryID: 18,
        iconUrl: STORY_ICON,
        imageUrl: STORY_IMAGE,
        to: "#",
        name: "Category 1",
        description: "Category 1 description",
        depth: 1,
        displayAs: "discussions",
        children: [],
        counts: [
            { count: 99, countAll: 99, labelCode: "discussions" },
            { count: 99000, countAll: 99000, labelCode: "comments" },
            { count: 99099, countAll: 99099, labelCode: "posts" },
            { count: 9, countAll: 9, labelCode: "followers" },
        ],
        lastPost: {
            url: "#",
            name: "Some discussion",
            dateInserted: "2020-10-06T15:30:44+00:00",
            insertUser: STORY_LEADERS[random(0, 5)].user,
        },
    },
];
